package task4;

import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;

public class CopyFile {
    public static void main(String[] args) throws Exception {
        BufferedInputStream b1=new BufferedInputStream(new FileInputStream("1.mp4"));
        BufferedOutputStream b2=new BufferedOutputStream(new FileOutputStream("C:\\1.mp4"));

        byte[] bytes=new byte[1024];
        int len=0;
        while ((len=b1.read(bytes))!=-1){
            b2.write(bytes,0,len);
        }
        b1.close();
        b2.close();
    }
}
